import http from '../utils/http'

/**
 * @description 获取地址列表
 * @returns Promise
 */
export const reqAddressList = (id) => {
  return http.get(`/api/address/list/${id}`)
}

export const reqAddAddress = (data) => {
  return http.post('/api/address/add',data)
}

export const reqAddressInfo = (id) => {
  return http.get(`/api/address/info/${id}`)
}

export const reqUpdateAddress = (data) => {
  return http.post('/api/address/update',data)
}

/**
 * @description 获取商品分类的数据
 * @returns Promise
 */
export const reqDelAddress = (id) => {
  return http.get(`/api/address/delete/${id}`)
}
